//
//  ViewController.swift
//  BandenglongWrapper
//
//  Created by zhouhua on 2017/9/30.
//  Copyright © 2017年 zhouhua. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var webViewBandenglong: UIWebView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        let url = URL(string: "http://101.132.70.210/t")
        if let unwrappedURL = url {
            
            let request = URLRequest(url: unwrappedURL)
            let session = URLSession.shared
            
            let task = session.dataTask(with: request) { (data, response, error) in
                
                if error == nil {
                    
                    self.webViewBandenglong.loadRequest(request)
                }
                else {
                    print("ERROR: \(error)")
                }
            }
            
            task.resume()
        }
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    override var prefersStatusBarHidden: Bool {
        return true
    }

}

